function getStyle(obj, attr) {
	return obj.currentStyle ? obj.currentStyle[attr] : getComputedStyle(obj)[attr];
}
//缓冲运动
function startmove(obj, json) {
	clearInterval(obj.timer);
	obj.timer = setInterval(function() {
		var oStop = true; //所有的变量都已经到达
		for(var attr in json) {

			var num = 0;
		     if(attr=='opacity'){
                    num=parseInt(parseFloat(getStyle(obj,attr))*100);
               }else{
                    num=parseInt(getStyle(obj,attr));
               }

			sudu = (json[attr] - num) / 8;
			sudu = sudu > 0 ? Math.ceil(sudu) : Math.floor(sudu);

			if(num != json[attr]) {
				oStop = false;
			}
			if(attr == 'opacity') {
				obj.style.opacity = (num + sudu) / 100;
			} else {
				obj.style[attr] = num + sudu + 'px';
			}
		}
		if(oStop) {
			clearInterval(obj.timer);
			obj.timer = null;
		}

	}, 30)
}
